<template>
  <component
    :is="componentName"
    :project-info="projectInfo"
    @change="changeComponent"
  />
</template>

<script>
import projectList from "./list";
import projectDetail from "./detail";
export default {
  components: { projectList, projectDetail },
  data() {
    return {
      componentName: "projectList",
      projectInfo: {},
    };
  },
  methods: {
    changeComponent({ componentName, projectInfo }) {
      this.componentName = componentName;
      this.projectInfo = projectInfo;
    },
  },
};
</script>

<style lang="scss" scoped></style>
